{extend name="wap/default_new/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/order.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/pro-detail.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/payment_order_new.css">
<style>
.shop-box{margin-bottom:10px;background-color:#FFF}
.order-goods-item{background-color:#FFF}
.shop-all-box{background-color:#fafafa}
.leavemessage{font-family:Helvetica,"STHeiti STXihei","Microsoft YaHei",Tohoma,Arial;color:#666;height:50px;padding:13px 10px;outline:0;border:0;float:right;width:72%;text-align:right;resize:none;outline:0;background:0 0;transition:height .5s}
.leavemessage:hover{height:100px}
.order-goods-item{border-bottom:1px solid #F2F2F2}
.shop-all-box{padding-bottom:1px}
.item-options b{color:#f23c3c}
.goods-info-price{color:#f23c3c}
.shop-goods-box{background-color:#f7f7f7}
.shop-count-box{text-align:right}
.count-shop-style{text-align:right;height:30px;line-height:30px}
.shop-count-money-snall-box{display:inline-block;min-width:20%}

</style>
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/payment_order_popup.css">
{/block}

{block name="goodsHead"}
<section class="head">
	<a class="head_back" href="{:__URL('APP_MAIN')}"><i class="icon-back"></i></a>
	<div class="head-title">{:lang('order_settlement')}</div>
</section>
{/block}
 
{block name="main"}
<div class="mask-layer"></div>
<div class="h50"></div>
{if condition="shop_order_list.address.id neq ''"}
<div id="addressok">
	<input type="hidden" id="addressid" value="{$shop_order_list.address.id}" />
	<div class="js-order-address express-panel js-edit-address express-panel-edit">
		<ul class="express-detail">
			<a href="{:__URL('APP_MAIN/member/memberaddress?url=cart')}">
				<li class="clearfix">
					<span class="name">{:lang('member_consignee')}：{$shop_order_list.address.consigner}</span>
					<span class="tel">{$shop_order_list.address.mobile}</span>
				</li>
				<li class="address-detail">{:lang('member_delivery_address')}：{$shop_order_list.address.address_info}-{$shop_order_list.address.address}</li>
			</a>
		</ul>
	</div>
</div>
{else /}
<div class="empty-address-tip">
	<div id="noaddress"><a href="{:__URL('APP_MAIN/member/memberaddress')}">{:lang('member_new_delivery_address')}</a></div>
</div>
{/if}


<div class="block-item express" style="padding: 0;"></div>
<section class="order">
	<div class="shop-all-box">
	{foreach name="shop_order_list.shop_goods_array" item="shop_item" key="key"}
			<div class="shop-box" shop-id = "{$shop_item.shop_id}" >
				<!-- 店铺配置及信息 start -->
				<!-- 商品总价 -->
				<input type="hidden" value="{$shop_item.goods_money}" class="goods_money"/>
				<!-- 配送时间是否开启 -->
				<input type="hidden" class="hidden_shipping_time" value="0"/>
				<!-- 店铺配置及信息 end -->
				<div class="item-options">
					
					{$shop_item.shop_name}
				</div>
				{foreach name="shop_item.sku_list_array" item="list"}
					<div class="order-goods-item clearfix  shop-goods-box" data-subtotal="{$list.subtotal}">
						<div class="name-card block-item">
							<a href="{:__URL('APP_MAIN/goods/goodsdetail?id='.$list['goods_id'])}" class="thumb">
								<img src="{:__IMG($list['picture_info']['pic_cover_small'])}" alt="{$list.goods_name}" />
							</a>
							<div class="detail">
								<div class="clearfix detail-row">
									<div class="right-col">
										<input type="hidden" name="goods_skuid" value="{$list.sku_id}" />
										<input type="hidden" name="goods_point_exchange"/>
										<b class="goods-info-price">{$list.point_exchange} {:lang('goods_integral')}</b>
									</div>
									<div class="left-col">
										<h3 style="font-weight: normal;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;">
											<a href="javascript:;">{$list.goods_name}</a>
										</h3>
									</div>
								</div>
								<div class="clearfix detail-row">
									<div class="right-col">
										<div class=" c-gray-darker">
											×<span>{$list.num}</span>
										</div>
									</div>
									<div class="left-col">
										<p class="c-gray-darker" style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;">{if condition="$list['sku_name'] neq '0'"}{$list.sku_name}{/if}</p>
									</div>
								</div>
							</div>
						</div>
					</div>
				{/foreach}
				<!-- 物流公司 -->
				<div class="item-options" shop-id = "{$shop_item.shop_id}"data-flag-shop="distribution-{$shop_item.shop_id}" data-flag ="distribution" data-select="0">
					<label>{:lang('member_delivery_mode')}</label>
					{if condition="!$shop_config.seller_dispatching && !$shop_config.buyer_self_lifting"}
					<span class="color-gray">{:lang('member_not_configure_distribution')}</span>
					{else/}
						{if condition="$shop_config.seller_dispatching"}
						<span class="arrow-right color-gray">{:lang('member_merchant_distribution')}</span>
						{elseif condition="$shop_config.buyer_self_lifting"/}
						<span class="arrow-right color-gray">{:lang('member_stores_from_mentioning')}</span>
						{/if}
					{/if}
				</div>
				
				<!-- 开启商家配送并且有物流公司显示 -->
				{if condition="$shop_config.seller_dispatching"}
					
					{if condition="!empty($shop_order_list.address)"}
						{if condition="empty($shop_item.express_company_list)"}
						<div class="item-options" data-flag="express_company" data-select="-1" shop-id = "{$shop_item.shop_id}" data-flag-shop="express_company-{$shop_item.shop_id}" >
							<label>{:lang('member_logistics_company')}</label>
							<span class="arrow-right color-gray">{:lang('member_not_set_up')}</span>
						</div>
						{elseif condition="!empty($shop_item.express_company_list)"}
						{foreach name="shop_item.express_company_list" item="company" key="k"}
						{if condition="$k==0"}
						<div class="item-options" data-flag="express_company" data-select="{$company.co_id}" data-express-fee="{$company.express_fee}" shop-id = "{$shop_item.shop_id}" data-flag-shop="express_company-{$shop_item.shop_id}" >
							<label>{:lang('member_logistics_company')}</label>
							<span class="arrow-right color-gray">{$company.company_name}</span>
						</div>
						{/if}
						{/foreach}
						{else/}
						<div class="item-options" data-flag="express_company" data-select="-2" shop-id = "{$shop_item.shop_id}" data-flag-shop="express_company-{$shop_item.shop_id}" >
							<label>{:lang('member_logistics_company')}</label>
							<span class="arrow-right color-gray">{:lang('member_not_freight_template')}</span>
						</div>
						{/if}
					{else/}
						<div class="item-options" data-flag="express_company" data-select="-2" shop-id = "{$shop_item.shop_id}" data-flag-shop="express_company-{$shop_item.shop_id}" >
							<label>{:lang('member_logistics_company')}</label>
							<span class="arrow-right color-gray">{:lang('please_fill_in_or_select_the_delivery_address_first')}</span>
						</div>
					{/if}	
				{/if}
				<!-- 自提点选择 -->
				<div class="item-options" data-flag="pickup_address" data-id="0" data-count="{$shop_item.pickup_point_list.total_count}" style="display:none;" data-flag-shop="pickup_address-{$shop_item.shop_id}" >
					<label>{:lang('member_self_addressed_address')}</label>
					<span class="arrow-right color-gray"></span>
				</div>
				
				<!-- 配送时间 -->
				{if condition="$shop_config.order_designated_delivery_time"}
				<div class="item-options" data-flag="shipping_time" style="display:none;" data-flag-shop="shipping_time-{$shop_item.shop_id}"  shop-id="{$shop_item.shop_id}">
					<label>{:lang('delivery_time')}</label>
					<div class="shipping_time">
						<input type="hidden" class="item-options" data-flag="shipping_time"/>
						<span class="time" data-default="{:lang('days_and_holidays_can_be_delivered')}">{:lang('days_and_holidays_can_be_delivered')}</span>
						<span class="update">{:lang('modify')}</span>
						<span class="delete" shop-id="{$shop_item.shop_id}">{:lang('delete')}</span>
					</div>
				</div>
				{/if}
	
				<!-- 买家留言 -->
				<div class="item-options">
					<label>{:lang('member_buyer_message')}</label>
					<textarea class="leavemessage" placeholder="{:lang('leave_a_message_for_the_seller')}" maxlength="100"></textarea>
				</div>
				<!-- 店铺金额统计 -->
				<div class="item-options shop-count-box">
					<div class="count-shop-style">合计<span class="shop-count-money-snall-box"><b class="shop-count-money1">{$shop_order_list['count_info']['count_points']}</b> {:lang('goods_integral')}</span></div>
				</div>
				<!-- 选择配送方式弹出框 -->
				<div class="mask-layer-control" data-flag="distribution-{$shop_item.shop_id}"  data-attr-shop-name = "distribution" data-is-logistics="{$shop_config.is_logistics}" shop-id = "{$shop_item.shop_id}">
					<div class="header">{:lang('choose_delivery_address')}<span class="close"></span></div>
					{if condition="!$shop_config.seller_dispatching && !$shop_config.buyer_self_lifting"}
						<p style="padding: 30px;text-align: center;">{:lang('member_not_configure_distribution')}</p>
					{else/}
					<div class="list">
						<ul>
							<!-- 为了用户更好的体验和理解，只要开启了商家配送，就显示。不考虑是否有物流公司 -->
				<!-- 			if condition="$shop_config.seller_dispatching && count($express_company_list)" -->
							{if condition="$shop_config.seller_dispatching"}
							<li class="item active" data-flag="1">
								<div class="check-img"></div>
								<div class="single">{:lang('member_merchant_distribution')}</div>
							</li>
							{/if}
							{if condition="$shop_config.buyer_self_lifting"}
							<li class="item" data-flag="2">
								<div class="check-img"></div>
								<div class="single">{:lang('member_stores_from_mentioning')}</div>
							</li>
							{/if}
						</ul>
					</div>
					<div class="footer">
						<button class="btn-green" style="margin: 0px;">{:lang('goods_determine')}</button>
					</div>
					{/if}
				</div>
				<!-- 选择配送方式弹出框 -->
				<!-- 选择物流公司弹出框 -->
				{if condition="$shop_config.seller_dispatching"}
				<div class="mask-layer-control" data-flag="express_company-{$shop_item.shop_id}" data-attr-shop-name = "express_company" shop-id = "{$shop_item.shop_id}">
					<div class="header">{:lang('the_choice_of_logistics_company')}<span class="close"></span></div>
					{if condition="empty($shop_order_list.address)" }
					<p style="padding: 30px;text-align: center;">{:lang('member_not_set_up')}</p>
					{elseif condition="!empty($shop_item.express_company_list)"}
					
						<div class="list">
							<ul>
								{foreach name="$shop_item.express_company_list" item="company" key="k"}
								<li class="item {if condition="$k==0"}active{/if}" data-coid="{$company.co_id}" data-express-fee="{$company.express_fee}">
									<div class="check-img"></div>
									<div class="single">{$company.company_name}</div>
								</li>
								{/foreach}
							</ul>
						</div>
						<div class="footer">
							<button class="btn-green" style="margin: 0px;">{:lang('goods_determine')}</button>
						</div>
					{else/}
					<p style="padding: 30px;text-align: center;">{:lang('member_not_freight_template')}</p>
					{/if}
				</div>
				{/if}
				<!-- 选择物流公司弹出框 -->
				
				{if condition="$shop_config.buyer_self_lifting"}
				<!-- 选择自提地址弹出框 -->
				<div class="mask-layer-control" data-flag="pickup_address-{$shop_item.shop_id}" data-attr-shop-name = "pickup_address" shop-id = "{$shop_item.shop_id}">
					<div class="header">{:lang('member_select_own_address')}<span class="close"></span></div>
					{if condition="$shop_item.pickup_point_list.total_count"}
					<div class="list">
						<ul>
							{foreach name="$shop_item.pickup_point_list.data" item="pickup" key="k"}
							<li class="item {if condition="$k==0"}active{/if}" data-id="{$pickup.id}">
								<div class="check-img"></div>
								<div class="single">{$pickup.province_name}&nbsp;{$pickup.city_name}&nbsp;{$pickup.dictrict_name}&nbsp;{$pickup.address}</div>
							</li>
							{/foreach}
						</ul>
					</div>
					<div class="footer">
						<button class="btn-green" style="margin: 0px;">{:lang('goods_determine')}</button>
					</div>
					{else/}
					<p style="padding: 30px;text-align: center;">{:lang('member_not_configured')}</p>
					{/if}
				</div>
				<!-- 选择自提地址弹出框 -->
				{/if}
				<!-- 选择送货时间弹出框 -->
				<div class="mask-layer-control" data-flag="shipping_time-{$shop_item.shop_id}" shop-id ="{shop_item.shop_id}" data-attr-shop-name = "shipping_time">
					<div class="header">{:lang('specify_delivery_time')}<span class="close"></span></div>
					<div class="date-list"></div>
					<div class="footer">
						<button class="btn-green" style="margin: 0px;">{:lang('goods_determine')}</button>
					</div>
				</div>
				<!-- 选择送货时间弹出框 -->
				<!-- 下拉的弹框 -->
			</div>
	{/foreach} 
	</div>
	

</section>

<div class="footer" style="min-height: 86px;" id="bottom_copyright">
	<div class="copyright">
		<div class="ft-copyright">
			<img src="__TEMP__/{$style}/public/images/logo_copy.png" id="copyright_logo_wap">
			<a href="{:__URL('APP_MAIN')}" target="_blank" id="copyright_companyname"></a>
		</div>
	</div>
</div>


<div style="height: 50px"></div>
<div class="order-total-pay bottom-fix">
	<div class="pay-container clearfix">
		<span class="c-gray-darker font-size-12">应扣积分：</span>
		<span class="font-size-16 theme-price-color"><b>{$shop_order_list['count_info']['count_points']}</b> {:lang('goods_integral')}</span>
		<button class="commit-bill-btn" onclick="submitOrder()">{:lang('member_place_order')}</button>
		<!-- 商品积分总数 -->
		<input type="hidden" id="hidden_count_points" value="{$shop_order_list['count_info']['count_points']}" />
		<!-- 我的账户积分数 -->
		<input type="hidden" id="hidden_point" value="{$member_account.point}" />
		<input type="hidden" id="goods_sku_list" value="{$goods_sku_list}" />
		
		
	</div>
</div>
{/block}
{block name="bottom"}{/block}
{block name="javascript"}
<script type="text/javascript" src="__TEMP__/{$style}/public/js/points_exchange_order_b2b2c.js"></script>
{/block}